package com.bfly.mall.product.enums;

/**
 * 评论状态
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/16 17:08
 */
public enum ProductCommentStatusEnum {

    WAIT(1, "待审核"),
    PASS(2, "审核通过"),
    UNPASS(3, "审核未通过");

    private int id;
    private String name;

    ProductCommentStatusEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static ProductCommentStatusEnum getStatus(int id) {
        for (ProductCommentStatusEnum status : ProductCommentStatusEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
